﻿using SD.TeachSystem.EntityFrameworkCore;
using SD.TeachSystem.EntityFrameworkCore.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SD.TeachSystem.Common.Services
{
    public class SystemLogService : ISystemLogService
    {
        private readonly ModelContext _modelContext;
        public SystemLogService(ModelContext modelContext) 
        {
            _modelContext = modelContext;
        }
        public async Task WriteLogAsync(SystemLogMes log)
        {
            _modelContext.SystemLogMes.Add(log);
            await _modelContext.SaveChangesAsync();
        }
    }
}
